//
//  YYJLNoticeCell.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/5.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//

#import "YYJLNoticeCell.h"
@interface YYJLNoticeCell ()
{
    UILabel * timeLb;//时间
    UIImageView * showPic;//展示图片
    UILabel * titleLb;//标题
    UILabel * contentLb;//内容
}
@end
@implementation YYJLNoticeCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
    }return self;
}
-(void)creatUI{
    
    UIView * bgView=[[UIView alloc]initWithFrame:CGRectMake(12*PER_WIDTH, 0, 351*PER_WIDTH, 267*PER_HEIGHT)];
    bgView.backgroundColor=[UIColor whiteColor];
    [self.contentView addSubview:bgView];
    
    timeLb=[MyControl createLabelWithFrame:CGRectMake(0, 15*PER_HEIGHT, bgView.width, 15*PER_HEIGHT) Font:15 Text:@"2016年11月26日" Color:FEELT_COLOR];
    timeLb.textAlignment=NSTextAlignmentCenter;
    [bgView addSubview:timeLb];
    
    showPic=[[UIImageView alloc]initWithFrame:CGRectMake(10*PER_WIDTH, timeLb.bottom+15*PER_HEIGHT, 331*PER_WIDTH, 150*PER_HEIGHT)];
    showPic.image=[UIImage imageNamed:@"img_gonggao1"];
    [bgView addSubview:showPic];
    
    titleLb=[MyControl createLabelWithFrame:CGRectMake(10*PER_WIDTH, showPic.bottom+10*PER_HEIGHT, bgView.width, 15*PER_HEIGHT) Font:15 Text:@"预告,翡翠商贸实作培训课开课啦" Color:BLACK_COLOR];
    [bgView addSubview:titleLb];
    
    contentLb=[MyControl createLabelWithFrame:CGRectMake(10*PER_WIDTH, titleLb.bottom, bgView.width, 50*PER_HEIGHT) Font:14 Text:@"翡翠商贸实作培训课开课啦.有意向的同学,请关注我们的活动公告动态" Color:FEELT_COLOR];
    contentLb.numberOfLines=0;
    [bgView addSubview:contentLb];
}
@end
